//
//  UILabelFactory.m
//  ZouXiu
//
//  Created by zhou huajian on 11-1-28.
//  Copyright 2011 itotemstudio. All rights reserved.
//

#import "UILabelFactory.h"


@implementation UILabelFactory

+ (UILabel*) newSingleLabel:(CGRect) frame text:(NSString*) text font:(UIFont*) font {
	UILabel *label = [[UILabel alloc] initWithFrame:frame];
	label.text = text;
    label.font = font;   
	label.highlightedTextColor = [UIColor whiteColor];
	label.textAlignment = UITextAlignmentLeft;
	label.baselineAdjustment = UIBaselineAdjustmentAlignCenters;
	label.backgroundColor = [UIColor clearColor];
	return label;
}

+ (UILabel*) newSingleLabel:(CGRect) frame text:(NSString*) text textColor:(UIColor*)textColor font:(UIFont*) font {
	UILabel *label = [[UILabel alloc] initWithFrame:frame];
	label.text = text;
	label.textColor = textColor;
	label.font = font;
	label.textAlignment = UITextAlignmentCenter;
	label.lineBreakMode = UILineBreakModeWordWrap;
	label.baselineAdjustment = UIBaselineAdjustmentAlignCenters;
	label.backgroundColor = [UIColor clearColor];
	return label;
}

+ (UILabel*) newMultpleLinesLabel:(CGRect) frame text:(NSString*) text font:(UIFont*) font lines:(NSInteger)lines {
	UILabel *label = [[UILabel alloc] initWithFrame:frame];
	label.text = text;
	label.numberOfLines = lines;
	label.font = font;
	label.highlightedTextColor = [UIColor whiteColor];
	label.lineBreakMode = UILineBreakModeWordWrap;
	label.baselineAdjustment = UIBaselineAdjustmentAlignCenters;
	label.backgroundColor = [UIColor clearColor];
	return label;	
}

@end
